package com.yhp.service.impl;

import com.yhp.bean.Student;
import com.yhp.dao.StudentDao;
import com.yhp.dao.impl.StudentDaoImpl;
import com.yhp.service.StudentService;

import java.util.List;

public class StudentServiceImpl implements StudentService {
    private StudentDao studentDao = new StudentDaoImpl();
    @Override
    public List<Student> getStu(int pageIndex,int pageSize,String stuname,String stuno,int sexNum) {

        return studentDao.getStu(pageIndex,pageSize,stuname,stuno,sexNum);
    }

    @Override
    public int total(String stuname,String stuno,int sexNum) {
        return studentDao.total(stuname,stuno,sexNum);
    }

    @Override
    public Student getById(int id) {
        return studentDao.getById(id);
    }

    @Override
    public int update(Student student) {
        int i = studentDao.update(student);
        return i;
    }

    @Override
    public int remove(int stuid) {
        return studentDao.remove(stuid);
    }

    @Override
    public int add(Student student) {
        return studentDao.add(student);
    }

    @Override
    public String isrepeat(String stuno) {
        return studentDao.isrepeat(stuno);
    }
}
